/**
 * Created by Generator on 2017/08/03
 */
package com.nmgmd.shequ.hospital.base.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import com.nmghr.base.jpa.annotation.ColumnComment;
import com.nmghr.base.jpa.entity.UUIDWithTimeEntity;
import com.nmghr.manager.rbac.entity.DictionaryEntity;
import javax.persistence.*;
import java.math.BigDecimal;

@Entity
@Table(name = "t_hos_stock_order")
@Data
@EqualsAndHashCode(callSuper = true)
public class StockOrderEntity extends UUIDWithTimeEntity {
    @Column(name="purchase_date")
    @ColumnComment(msg = "进货时间")
    private Long purchaseDate;

    @Column(name="pay_person", length=100)
    @ColumnComment(msg = "付款人")
    private String payPerson;

    @ColumnComment(msg = "支付方式")
    @ManyToOne
    @JoinColumn(name = "pay_type_id")
    private DictionaryEntity payType;

    @Column(name="payable", precision=18, scale=2)
    @ColumnComment(msg = "应付总额")
    private BigDecimal payable;

    @Column(name="act_payable", precision=18, scale=1)
    @ColumnComment(msg = "实际付款")
    private BigDecimal actPayable;

    @Column(name="relief_payable", precision=18, scale=2)
    @ColumnComment(msg = "减免金额")
    private BigDecimal reliefPayable;

    @Column(name="relief_reason", length=1000)
    @ColumnComment(msg = "减免原因")
    private String reliefReason;

    @Column(name="purchase_name")
    @ColumnComment(msg = "进货单名称")
    private String purchaseName;

}
